export const apiAuth = {
  login: (data: { loginType?: boolean; account: string; password: string }) => {
    return api.action({
      url: 'login',
      method: 'post',
      data,
    })
  },
  logout: () => {
    return api.request({
      url: 'logout',
    })
  },
  info: () => {
    return api.query({
      url: 'user/info',
    })
  },
  changePassword: (data: { oldPassword: string; newPassword: string; confirmPassword: string }) => {
    return api.update({
      url: 'user/changePassword',
      data,
    })
  },
}
